/**
 * 
 */
package info.niwota.fwrite;

/**
 * @author qiangli
 * 
 */
public class KeyHelper {
	
	private static final String[] keys = { "bs", "lf", "sp" };
	private static final int[] ids = { R.id.keyboard_bs, R.id.keyboard_lf,
			R.id.keyboard_sp };

	private KeyHelper() {
	}

	public static int map(String key) {
		for (int i = 0; i < keys.length; i++) {
			if (keys[i].equals(key)) {
				return ids[i];
			}
		}
		return -1;
	}
	
	public static String map(int id) {
		for (int i = 0; i < ids.length; i++) {
			if (id == ids[i]) {
				return keys[i];
			}
		}
		return null;
	}
}
